﻿using MusicLibrary.DataModels;
using MusicLibrary.Web.IDataAdapters.Adapters;
using MusicLibrary.Web.IDataAdapters.Interfaces;
using MusicLibrary.Web.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace MusicLibrary.Web.Controllers
{
    public class SongController : ApiController
    {
        IMusicLibraryAdapter _adapter = new MusicLibraryAdapter();

        //GET  api/song
        public IHttpActionResult Get(int id)
        {
            List<SongListVM> vm = _adapter.GetSongList(id);
            return Ok(vm);
        }
    }
}
